import os, sys

from docs_class import Docs

def add_node ( liwe, id_node = '', title = '', text = '', parent_id = '' ):
	"""
	:INPUT:
		- id_node 	SAFE_DB_NUMBER
		- title		SAFE_DB_STRING
		- text		SAFE_DB_STRING
		- parent_id 	SAFE_DB_NUMBER
	"""
	d = Docs ( liwe )

	d.add_node ( id_node, title, text, parent_id )

	return { "res" : "OK" }

def del_node ( liwe, id_node = '' ):
	"""
	:INPUT:
		- id_node 	SAFE_STRING
	"""
	d = Docs ( liwe )

	res = d.del_node ( id_node )

	return res

def move_node ( liwe, evt_name = '', id_node = '' ):
	"""
	:INPUT:
		- evt_name	SAFE_STRING
		- id_node 	SAFE_DB_NUMBER
	"""
	d = Docs ( liwe )
	res = d.move_node ( evt_name, id_node )	
